package com.qinggeng.project.tool.pay.domain;

import com.qinggeng.framework.aspectj.lang.annotation.Excel;
import com.qinggeng.framework.web.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 支付宝支付信息对象 pay_alipay
 *
 * @author qinggeng
 * @date 2020-02-13
 */
@Data
public class PayAlipay extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long payId;

    /** 支付宝交易凭证号 */
    @Excel(name = "支付宝交易凭证号")
    private String tradeNo;

    /** 原支付请求的商户订单号 */
    @Excel(name = "原支付请求的商户订单号")
    private String outTradeNo;

    /** 买家支付宝账号 */
    @Excel(name = "买家支付宝账号")
    private String buyerId;

    /** 卖家支付宝用户号 */
    @Excel(name = "卖家支付宝用户号")
    private String sellerId;

    /** 本次交易支付的订单金额，单位为人民币 */
    @Excel(name = "本次交易支付的订单金额，单位为人民币")
    private Double totalAmount;

    /** 退款通知中，返回总退款金额 */
    @Excel(name = "退款通知中，返回总退款金额")
    private Double refundFee;

    /**订单标题 */
    @Excel(name = "订单标题")
    private String subject;

    /** 商品描述 */
    @Excel(name = "商品描述")
    private String body;

    /** 交易状态 */
    @Excel(name = "交易状态")
    private String tradeStatus;

    /** 交易创建时间*/
    @Excel(name = "交易创建时间 ", width = 30, dateFormat = "yyyy-MM-dd")
    private Date gmtCreate;

    /** 交易付款时间 */
    @Excel(name = "交易付款时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date gmtPayment;

    /**交易退款时间 */
    @Excel(name = "交易退款时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date gmtRefund;

    /**交易结束时间 */
    @Excel(name = "交易结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date gmtClose;

    /** 交易类型 */
    @Excel(name = "交易类型")
    private String tradeType;


    public Long getPayId() {
        return payId;
    }

    public void setPayId(Long payId) {
        this.payId = payId;
    }

    public String getTradeNo() {
        return tradeNo;
    }

    public void setTradeNo(String tradeNo) {
        this.tradeNo = tradeNo;
    }

    public String getOutTradeNo() {
        return outTradeNo;
    }

    public void setOutTradeNo(String outTradeNo) {
        this.outTradeNo = outTradeNo;
    }

    public String getBuyerId() {
        return buyerId;
    }

    public void setBuyerId(String buyerId) {
        this.buyerId = buyerId;
    }

    public String getSellerId() {
        return sellerId;
    }

    public void setSellerId(String sellerId) {
        this.sellerId = sellerId;
    }

    public Double getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(Double totalAmount) {
        this.totalAmount = totalAmount;
    }

    public Double getRefundFee() {
        return refundFee;
    }

    public void setRefundFee(Double refundFee) {
        this.refundFee = refundFee;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public String getBody() {
        return body;
    }

    public void setBody(String body) {
        this.body = body;
    }

    public String getTradeStatus() {
        return tradeStatus;
    }

    public void setTradeStatus(String tradeStatus) {
        this.tradeStatus = tradeStatus;
    }

    public Date getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public Date getGmtPayment() {
        return gmtPayment;
    }

    public void setGmtPayment(Date gmtPayment) {
        this.gmtPayment = gmtPayment;
    }

    public Date getGmtRefund() {
        return gmtRefund;
    }

    public void setGmtRefund(Date gmtRefund) {
        this.gmtRefund = gmtRefund;
    }

    public Date getGmtClose() {
        return gmtClose;
    }

    public void setGmtClose(Date gmtClose) {
        this.gmtClose = gmtClose;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("payId", getPayId())
            .append("tradeNo", getTradeNo())
            .append("outTradeNo", getOutTradeNo())
            .append("buyerId", getBuyerId())
            .append("sellerId", getSellerId())
            .append("totalAmount", getTotalAmount())
            .append("refundFee", getRefundFee())
            .append("subject", getSubject())
            .append("body", getBody())
            .append("tradeStatus", getTradeStatus())
            .append("gmtCreate", getGmtCreate())
            .append("gmtPayment", getGmtPayment())
            .append("gmtRefund", getGmtRefund())
            .append("gmtClose", getGmtClose())
            .toString();
    }
}
